import { getAction, postAction,downFile } from '@/api/manage'


//装修新增编辑
const saveOrUpdateRenovation = (params) => postAction("/backend/vip/invite/saveOrUpdateRenovation", params);

// 规则管理 新增/编辑
const saveOrUpdateRule = (params) => postAction("/backend/vip/invite/saveOrUpdateRule", params);

// 参数配置 新增/编辑
const saveOrUpdateParameter = (params) => postAction("/backend/vip/invite/saveOrUpdateParameter", params);

//品牌下拉
const brandList = (params) => getAction("/backend/vip/invite/brandList", params);

// 数据看板列表
const dataBoard = (params) => getAction("/backend/vip/invite/pageInviteLog", params);

// 数据看板 访问量
const visitsSummary = (params) => getAction("/backend/vip/invite/visitsSummary", params);

// 数据看板列表导出
const exportDataBoard = (params) => downFile("/backend/vip/invite/exportInviteLog", params);

//获取装修详情信息
const getRenovationItemByParentId = (params) => getAction("/backend/vip/invite/getRenovationItemByParentId", params);

//保存或发布装修详情信息 type区分 0保存 1发布
const saveOrReleaseRenovationItem = (params) => postAction("/backend/vip/invite/saveOrReleaseRenovationItem", params);

//根据品牌获取会员列表下拉框
const vipTypeList = (params) => getAction("/backend/vip/invite/vipTypeList", params);

//获取装修详情页面 会员卡样式
const getRenovationItemVipTypeImage = (params) => getAction("/backend/vip/invite/getRenovationItemVipTypeImage", params);



export {
  saveOrUpdateRenovation,
  brandList,
  saveOrUpdateParameter,
  dataBoard,
  exportDataBoard,
  saveOrUpdateRule,
  visitsSummary,
  saveOrReleaseRenovationItem,
  vipTypeList,
  getRenovationItemByParentId,
  getRenovationItemVipTypeImage
}
